﻿//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NetCMS.Content;

public partial class manage_channel_CreatLabel_SaveStyle : NetCMS.Web.UI.ManagePage
{
    Channel rd = new Channel();
    protected void Page_Load(object sender, EventArgs e)
    {
        int ID = 0;
        int ChID = int.Parse(Request.QueryString["ChID"].ToString());
        if (Request.QueryString["ClassID"] == string.Empty && Request.QueryString["ClassID"]==null)
        {
            Response.Write("请先创建栏目");
            Response.End();
        }
        int classID = int.Parse(Request.QueryString["ClassID"]);
        string styleName = Request.QueryString["StyleName"];
        if (rd.GetStyleRecord(styleName, ID, ChID) > 0)
        {
            Response.Write("样式名称重复");
            Response.End();
        }
        string GstyleContent = NetCMS.Common.Input.HtmlDecode((Request.QueryString["Content"] + "").ToString());
        int isLock = 0;
        string styleDescript = "";
        DateTime Creatitime = DateTime.Now;
        NetCMS.Model.styleChContent uc = new NetCMS.Model.styleChContent();
        uc.Id = ID;
        uc.ChID = ChID;
        uc.classID = classID;
        uc.styleName = styleName;
        uc.styleContent = GstyleContent;
        uc.isLock = isLock;
        uc.styleDescript = styleDescript;
        uc.creattime = Creatitime;
        uc.SiteID = SiteID;
        rd.InsertStyleContent(uc);
        Response.Write("保存样式成功");
        Response.End();
    }
}
